home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 119
/
(Vol 119) Nov 09 2010.iso
/
TGKI-109
/
Games
/
snack_attack.swf
/
scripts
/
DefineSprite_326
/
frame_1
/
DoAction.as
Wrap
Text File
|
2010-11-09
|
983b
|
47 lines
set("t3/:side","r");
set("t1/:side","l");
if(_X < eval("/:tarx"))
{
_X = _X + eval("/:moveInc");
if(_X >= eval("/:tarx"))
{
_X = eval("/:tarx");
set("/:currplace",eval("/:currtar"));
}
}
else if(eval("/:tarx") < _X)
{
_X = _X - eval("/:moveInc");
if(eval("/:tarx") >= _X)
{
_X = eval("/:tarx");
set("/:currplace",eval("/:currtar"));
}
}
call("tires" add eval("/:currtar"));
i = "1";
while("3" >= i)
{
X = getProperty("t" add i, _X);
tarx = eval("tiretar" add i);
if(x < tarx)
{
setProperty("t" add i, _X, x + eval("/:moveInc"));
X = getProperty("t" add i, _X);
if(x >= tarx)
{
setProperty("t" add i, _X, tarx);
}
}
else if(tarx < x)
{
setProperty("t" add i, _X, x - eval("/:moveInc"));
X = getProperty("t" add i, _X);
if(tarx >= x)
{
setProperty("t" add i, _X, tarx);
}
}
i += "1";
}